package com.oa.dao.base;

import java.io.Serializable;
import java.util.List;

import com.oa.utils.PageBean;
import org.hibernate.criterion.DetachedCriteria;

/**
 * @param <T>
 * @author Administrator
 */
public interface BaseDao<T> {
    public void save(T entity);

    public void delete(T entity);

    public void update(T entity);

    public void saveOrUpdate(T entity);

    public T findById(Serializable id);

    public T findByIdString(String id);

    public List<T> findAll();

    public PageBean pagingQuery(PageBean pb);

    public Integer getTotalCount(DetachedCriteria dc);

    public T findByCriteria(DetachedCriteria dc);

    public List<T> findByCriteriaReturnList(DetachedCriteria dc);
}
